import axios from '@/libs/api.request'

export default class workScheduleApi {
  // 保存工作计划
  static Save = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/Save',
      data: params,
      method: 'post'
    })
  }

  // 获取工作计划类型
  static GetPlanClassifyList = (params) => {
    return axios.request({
      url: '/SysBasedata/GetSelectIdList?type=PlanClassify',
      params: params,
      method: 'get'
    })
  }

  // 获取关联的客户
  static GetCustomerList = (params) => {
    return axios.request({
      url: '/SalesCustomer/GetCustomerList',
      data: params,
      method: 'post'
    })
  }

  // 获取个人工作计划列表
  static GetPlanList = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/GetPlanList',
      data: params,
      method: 'post'
    })
  }

  // 根据ID获取工作计划详情
  static GetModel = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/GetModel',
      params: params,
      method: 'get'
    })
  }

  // 根据用户ID+日期获取目标任务
  static GetWeekPlan = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/GetWeekPlan',
      data: params,
      method: 'post'
    })
  }

  // 保存目标任务
  static SaveWeekPlan = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/SaveWeekPlan',
      data: params,
      method: 'post'
    })
  }

  // 获取员工工作计划列表
  static GetFullList = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/GetFullList',
      data: params,
      method: 'post'
    })
  }

  // 保存完成任务
  static SaveTask = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/SaveTask',
      data: params,
      method: 'post'
    })
  }

  // 批量确认完成
  static BatchConfirm = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/BatchConfirm',
      data: params,
      method: 'post'
    })
  }

  // 批量删除
  static Delete = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/Delete',
      data: params,
      method: 'post'
    })
  }

  // 根据ID获取工作计划
  static GetModel = (params) => {
    return axios.request({
      url: '/WorkPlanComplete/GetModel',
      params: params,
      method: 'get'
    })
  }
}